home *** CD-ROM | disk | FTP | other *** search
-
- Turbo Pascal for Windows Example BitBlt / DIB Programs
- ------------------------------------------------------
-
- These programs are examples of manipulating device independant bitmaps (DIBs)
- in TPW. The first (Blit4) is based on LOADBMP in chapter 8 of Tom Swan's
- "Turbo Pascal for Windows 3.0 Programming", Blit8 and DIB8 are 256-color
- extensions of the example.
-
- Hopefully, these will provide an simple example of 256-color bitmap code
- using TPW. If anyone has any comments to offer on the way things are done,
- please let me know: I'm just learning this stuff and these are my first cuts
- at this!
-
-
- Program Purpose
- --------- -----------
- Blit4 BitBlit example for 4 bit / pixel (16-color) bitmaps
- Blit8 BitBlit example for 8 bit / pixel (256-color) bitmaps
- DIB8 SetDIBits example for 8 bit / pixel bitmaps
-
- Blit8 and DIB8 do the same thing in two different ways. DIB8 takes up less
- room since GDI dosen't also have a copy of the bitmap in memory.
-
-
- Operation
- ---------
-
- Click the left mouse button to increase the enlargement factor by 1/2.
- Click the right mouse button to decrease it by 1/2.
-
-
- Sources
- -------
-
- The code for processing DIBs is derived from Charles Petzold's PC Magazine
- "Environments" articles on DIBs (28 May 91 through 24 Sep 91) and his
- articles on palette manipulation (26 Feb 91 through 30 April 91).
-
- The Calc_DIB_Data procedure is based on CP's DIBDataAddress function.
-
-
- Known Problems
- --------------
-
- For some reason, the Blit8 program's StretchBlit dosen't work for Factors
- that aren't whole numbers.
-
- Blit8 and DIB8 haven't been tested with OS/2 1.x-style DIBs.
-
- I've no idea whether the DIB and palette initialization would be better
- done in Init or SetupWindow. For Blit8 I need a valid HWindow, so I think
- that one (at least) needs SetupWindow.
-
-
- Ralph Smith, clySmic software [76156,164] or [76376,3150]